<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>域名验证与Cookie获取系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #1a2a6c, #2c3e50, #4a235a);
            color: #f0f0f0;
            min-height: 100vh;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .container {
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
        }
        
        header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
            animation: fadeIn 1s ease;
        }
        
        header h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            background: linear-gradient(90deg, #4facfe, #00f2fe);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        header p {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 700px;
            margin: 0 auto;
            line-height: 1.6;
        }
        
        .card {
            background: rgba(25, 30, 45, 0.85);
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
            padding: 30px;
            margin-bottom: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            animation: slideUp 0.8s ease;
        }
        
        .card-title {
            display: flex;
            align-items: center;
            margin-bottom: 25px;
            color: #4facfe;
            font-size: 1.5rem;
        }
        
        .card-title i {
            margin-right: 12px;
            background: linear-gradient(90deg, #4facfe, #00f2fe);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .form-group {
            margin-bottom: 25px;
        }
        
        label {
            display: block;
            margin-bottom: 10px;
            font-weight: 500;
            color: #b0b0ff;
        }
        
        input {
            width: 100%;
            padding: 15px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(15, 20, 35, 0.8);
            color: white;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        input:focus {
            outline: none;
            border-color: #4facfe;
            box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
        }
        
        .btn {
            background: linear-gradient(90deg, #4facfe, #00f2fe);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .btn i {
            margin-right: 10px;
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 7px 15px rgba(0, 242, 254, 0.3);
        }
        
        .btn:active {
            transform: translateY(0);
        }
        
        .btn-block {
            display: block;
            width: 100%;
        }
        
        .result-container {
            margin-top: 30px;
            background: rgba(15, 20, 35, 0.6);
            border-radius: 10px;
            padding: 20px;
            display: none;
        }
        
        .result-title {
            color: #00f2fe;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .cookie-display {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            padding: 15px;
            font-family: monospace;
            font-size: 0.95rem;
            max-height: 200px;
            overflow-y: auto;
            line-height: 1.5;
        }
        
        .captcha-container {
            background: rgba(15, 20, 35, 0.6);
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            margin-top: 20px;
            display: none;
        }
        
        .captcha-box {
            display: inline-block;
            background: white;
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }
        
        .captcha-text {
            font-size: 1.8rem;
            letter-spacing: 5px;
            color: #1a2a6c;
            font-weight: bold;
            margin: 15px 0;
            user-select: none;
        }
        
        .captcha-controls {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 20px;
        }
        
        .captcha-controls input {
            width: 200px;
            padding: 12px;
        }
        
        .status-bar {
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            margin: 25px 0;
            overflow: hidden;
            display: none;
        }
        
        .status-progress {
            height: 100%;
            width: 0;
            background: linear-gradient(90deg, #4facfe, #00f2fe);
            border-radius: 4px;
            transition: width 0.5s ease;
        }
        
        .step-container {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
        }
        
        .step {
            text-align: center;
            flex: 1;
            position: relative;
            padding: 0 10px;
        }
        
        .step:not(:last-child):after {
            content: '';
            position: absolute;
            top: 20px;
            right: 0;
            width: 100%;
            height: 2px;
            background: rgba(255, 255, 255, 0.2);
            z-index: 1;
        }
        
        .step-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(79, 172, 254, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            position: relative;
            z-index: 2;
        }
        
        .step.active .step-icon {
            background: linear-gradient(135deg, #4facfe, #00f2fe);
        }
        
        .step.completed .step-icon {
            background: #2ecc71;
        }
        
        .step-text {
            font-size: 0.9rem;
            opacity: 0.8;
        }
        
        .step.active .step-text {
            opacity: 1;
            color: #00f2fe;
            font-weight: 500;
        }
        
        .step.completed .step-text {
            color: #2ecc71;
        }
        
        .loader {
            display: flex;
            justify-content: center;
            margin: 20px 0;
            display: none;
        }
        
        .loader-dot {
            width: 12px;
            height: 12px;
            background: #00f2fe;
            border-radius: 50%;
            margin: 0 5px;
            animation: loader 1s infinite;
        }
        
        .loader-dot:nth-child(2) {
            animation-delay: 0.2s;
        }
        
        .loader-dot:nth-child(3) {
            animation-delay: 0.4s;
        }
        
        @keyframes loader {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes slideUp {
            from { 
                opacity: 0;
                transform: translateY(30px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .info-box {
            background: rgba(79, 172, 254, 0.15);
            border-left: 4px solid #4facfe;
            padding: 15px;
            border-radius: 0 8px 8px 0;
            margin: 20px 0;
            font-size: 0.95rem;
        }
        
        .info-box i {
            margin-right: 10px;
            color: #4facfe;
        }
        
        @media (max-width: 768px) {
            .step-container {
                flex-wrap: wrap;
            }
            
            .step {
                flex: 0 0 50%;
                margin-bottom: 20px;
            }
            
            .step:after {
                display: none;
            }
            
            header h1 {
                font-size: 2.2rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>域名验证与Cookie获取系统</h1>
            <p>输入目标域名和内容URL，系统将自动处理人机验证并获取相关Cookie信息</p>
        </header>
        
        <div class="step-container">
            <div class="step completed">
                <div class="step-icon"><i class="fas fa-info-circle"></i></div>
                <div class="step-text">输入信息</div>
            </div>
            <div class="step active">
                <div class="step-icon"><i class="fas fa-shield-alt"></i></div>
                <div class="step-text">人机验证</div>
            </div>
            <div class="step">
                <div class="step-icon"><i class="fas fa-cookie"></i></div>
                <div class="step-text">获取Cookie</div>
            </div>
            <div class="step">
                <div class="step-icon"><i class="fas fa-check-circle"></i></div>
                <div class="step-text">完成</div>
            </div>
        </div>
        
        <div class="card">
            <div class="card-title">
                <i class="fas fa-globe"></i>
                <h2>域名信息</h2>
            </div>
            
            <div class="form-group">
                <label for="targetDomain"><i class="fas fa-link"></i> 目标域名</label>
                <input type="text" id="targetDomain" placeholder="例如：example.com" value="example.com">
            </div>
            
            <div class="form-group">
                <label for="contentUrl"><i class="fas fa-file-alt"></i> 内容URL</label>
                <input type="text" id="contentUrl" placeholder="例如：https://example.com/content-page" value="https://example.com/content-page">
            </div>
            
            <div class="info-box">
                <i class="fas fa-info-circle"></i> 系统将自动处理人机验证并获取目标域名的Cookie信息。请确保您有权限访问该域名。
            </div>
            
            <button id="startBtn" class="btn btn-block">
                <i class="fas fa-play"></i> 开始验证处理
            </button>
        </div>
        
        <div class="status-bar" id="statusBar">
            <div class="status-progress" id="statusProgress"></div>
        </div>
        
        <div class="captcha-container" id="captchaContainer">
            <div class="card-title">
                <i class="fas fa-robot"></i>
                <h2>人机验证</h2>
            </div>
            
            <p>请完成以下验证以证明您不是机器人</p>
            
            <div class="captcha-box">
                <div class="captcha-text" id="captchaText">A3B8K</div>
                <button class="btn" id="refreshCaptcha">
                    <i class="fas fa-sync-alt"></i> 刷新验证码
                </button>
            </div>
            
            <div class="captcha-controls">
                <input type="text" id="captchaInput" placeholder="输入上方验证码">
                <button class="btn" id="submitCaptcha">
                    <i class="fas fa-check"></i> 提交验证
                </button>
            </div>
        </div>
        
        <div class="loader" id="loader">
            <div class="loader-dot"></div>
            <div class="loader-dot"></div>
            <div class="loader-dot"></div>
        </div>
        
        <div class="result-container" id="resultContainer">
            <div class="card-title">
                <i class="fas fa-cookie-bite"></i>
                <h2>获取的Cookie信息</h2>
            </div>
            
            <div class="cookie-display" id="cookieDisplay">
                <!-- Cookie信息将在这里显示 -->
            </div>
            
            <div style="margin-top: 20px; display: flex; gap: 15px;">
                <button class="btn" id="copyBtn">
                    <i class="fas fa-copy"></i> 复制Cookie
                </button>
                <button class="btn" id="resetBtn">
                    <i class="fas fa-redo"></i> 重置系统
                </button>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 获取DOM元素
            const startBtn = document.getElementById('startBtn');
            const captchaContainer = document.getElementById('captchaContainer');
            const captchaText = document.getElementById('captchaText');
            const refreshCaptcha = document.getElementById('refreshCaptcha');
            const submitCaptcha = document.getElementById('submitCaptcha');
            const captchaInput = document.getElementById('captchaInput');
            const resultContainer = document.getElementById('resultContainer');
            const cookieDisplay = document.getElementById('cookieDisplay');
            const copyBtn = document.getElementById('copyBtn');
            const resetBtn = document.getElementById('resetBtn');
            const statusBar = document.getElementById('statusBar');
            const statusProgress = document.getElementById('statusProgress');
            const loader = document.getElementById('loader');
            
            // 生成随机验证码
            function generateCaptcha() {
                const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
                let captcha = '';
                for (let i = 0; i < 5; i++) {
                    captcha += chars.charAt(Math.floor(Math.random() * chars.length));
                }
                captchaText.textContent = captcha;
            }
            
            // 模拟获取Cookie
            function simulateGetCookies() {
                const domain = document.getElementById('targetDomain').value;
                
                // 模拟的Cookie数据
                const cookies = [
                    `session_id=9a8b7c6d5e4f3g2h1; Domain=.${domain}; Path=/; Secure; HttpOnly`,
                    `user_token=1j2k3l4m5n6o7p8q; Domain=.${domain}; Path=/; Expires=Wed, 21 Oct 2025 07:28:00 GMT`,
                    `preferences=theme:dark|lang:en; Domain=.${domain}; Path=/; Max-Age=2592000`,
                    `analytics_consent=true; Domain=.${domain}; Path=/; SameSite=Lax`,
                    `csrf_token=z9y8x7w6v5u4t3s2; Domain=.${domain}; Path=/; Secure; HttpOnly`
                ];
                
                return cookies.join('\n');
            }
            
            // 开始验证过程
            startBtn.addEventListener('click', function() {
                const domain = document.getElementById('targetDomain').value;
                const url = document.getElementById('contentUrl').value;
                
                if (!domain || !url) {
                    alert('请输入目标域名和内容URL');
                    return;
                }
                
                // 显示状态条和加载动画
                statusBar.style.display = 'block';
                loader.style.display = 'flex';
                
                // 模拟进度条
                let progress = 0;
                const interval = setInterval(() => {
                    progress += 5;
                    statusProgress.style.width = progress + '%';
                    
                    if (progress >= 40) {
                        clearInterval(interval);
                        
                        // 显示人机验证
                        setTimeout(() => {
                            loader.style.display = 'none';
                            captchaContainer.style.display = 'block';
                            statusProgress.style.width = '50%';
                            generateCaptcha();
                        }, 300);
                    }
                }, 100);
            });
            
            // 刷新验证码
            refreshCaptcha.addEventListener('click', generateCaptcha);
            
            // 提交验证码
            submitCaptcha.addEventListener('click', function() {
                const userInput = captchaInput.value.toUpperCase();
                const actualCaptcha = captchaText.textContent;
                
                if (!userInput) {
                    alert('请输入验证码');
                    return;
                }
                
                if (userInput !== actualCaptcha) {
                    alert('验证码错误，请重新输入');
                    captchaInput.value = '';
                    generateCaptcha();
                    return;
                }
                
                // 验证通过
                statusProgress.style.width = '70%';
                loader.style.display = 'flex';
                captchaContainer.style.display = 'none';
                
                // 模拟获取Cookie的过程
                setTimeout(() => {
                    statusProgress.style.width = '100%';
                    
                    setTimeout(() => {
                        loader.style.display = 'none';
                        
                        // 显示结果
                        cookieDisplay.textContent = simulateGetCookies();
                        resultContainer.style.display = 'block';
                        
                        // 更新步骤
                        document.querySelectorAll('.step')[2].classList.add('completed');
                        document.querySelectorAll('.step')[3].classList.add('active');
                    }, 800);
                }, 1500);
            });
            
            // 复制Cookie
            copyBtn.addEventListener('click', function() {
                const textarea = document.createElement('textarea');
                textarea.value = cookieDisplay.textContent;
                document.body.appendChild(textarea);
                textarea.select();
                document.execCommand('copy');
                document.body.removeChild(textarea);
                
                const originalText = copyBtn.innerHTML;
                copyBtn.innerHTML = '<i class="fas fa-check"></i> 已复制!';
                
                setTimeout(() => {
                    copyBtn.innerHTML = originalText;
                }, 2000);
            });
            
            // 重置系统
            resetBtn.addEventListener('click', function() {
                document.getElementById('targetDomain').value = '';
                document.getElementById('contentUrl').value = '';
                captchaInput.value = '';
                captchaContainer.style.display = 'none';
                resultContainer.style.display = 'none';
                statusBar.style.display = 'none';
                statusProgress.style.width = '0';
                loader.style.display = 'none';
                
                // 重置步骤
                document.querySelectorAll('.step').forEach((step, index) => {
                    step.classList.remove('active', 'completed');
                    if (index === 0) step.classList.add('completed');
                    if (index === 1) step.classList.add('active');
                });
                
                generateCaptcha();
            });
            
            // 初始化验证码
            generateCaptcha();
        });
    </script>
</body>
</html>